import Vue from 'vue';
import Router from 'vue-router';

import Login from '@/pages/Login';
import Main from '@/pages/Main';
import Home from '@/pages/Home';

// account login
import AccountLoginPage from '@/pages/account/AccountLoginPage';
// account forget pwd phone
import AccountFPwd2PhonePage from '@/pages/account/AccountFPwd2PhonePage';
// account forget pwd update
import AccountFPwd2UpdatePage from '@/pages/account/AccountFPwd2UpdatePage';
//account list
import AccountListPage from '@/pages/account/AccountListPage';
//用户
import UserListPage from '@/pages/user/UserListPage';
import UserInviteListPage from '@/pages/user/UserInviteListPage';
import UserSpacePage from '@/pages/user/UserSpacePage';

import UserLabelPage from '@/pages/user/UserLabelPage';
import LanguagePage from '@/pages/user/LanguagePage';
import NationPage from '@/pages/user/NationPage';

//广告
import AdListPage from '@/pages/ad/AdListPage';
import AdEditPage from '@/pages/ad/AdEditPage';
//公告
import NoticeListPage from '@/pages/notice/NoticeListPage';
import NoticeEditPage from '@/pages/notice/NoticeEditPage';

import WorksListPage from '@/pages/works/WorksListPage';

import Works2StatusPage from '@/pages/works/Works2StatusPage';
import Works2WaitPage from '@/pages/works/Works2WaitPage';

import WorksEditPage from '@/pages/works/WorksEditPage';
import WorksDetailPage from '@/pages/works/WorksDetailPage';
// 作品属性、类型、地区
import WorksAttrPage from '@/pages/works/WorksAttrPage';
import WorksTypePage from '@/pages/works/WorksTypePage';
import WorksAreaPage from '@/pages/works/WorksAreaPage';
import WorksLabelPage from '@/pages/works/WorksLabelPage';

import AttributeTagPage from '@/pages/tag/AttributeTagPage';
import AttributeTagGroupPage from '@/pages/tag/AttributeTagGroupPage';



Vue.use(Router);
export default new Router({
	routes: [{
			path: '/',
			component: Login,
			children: [{//account login
				path: '/',
				name: 'accountLogin',
				component: AccountLoginPage
			}, {//account forget pwd
				path: '/login/fpwd/phone',
				name: 'accountFPwd2Phone',
				component: AccountFPwd2PhonePage
			}, {//account forget pwd
				path: '/login/fpwd/update',
				name: 'accountFPwd2Update',
				component: AccountFPwd2UpdatePage
			}]
		},
		{
			path: '/main',
			name: 'main',
			component: Main,
			redirect: '/main/home',
			children: [{//主页
				path: '/main/home',
				name: 'home',
				component: Home
			}, {//用户列表
				path: '/main/userList',
				name: 'userList',
				component: UserListPage
			}, {//用户邀请列表
				path: '/main/userInviteList',
				name: 'userInviteList',
				component: UserInviteListPage
			}, {//用户个人主页
				path: '/main/userSpace',
				name: 'userSpace',
				component: UserSpacePage
			}, {
				path: '/main/userLabel',
				name: 'userLabel',
				component: UserLabelPage
			}, {//语言
				path: '/main/language',
				name: 'language',
				component: LanguagePage
			}, {//民族
				path: '/main/nation',
				name: 'nation',
				component: NationPage
			}, {//公告列表
				path: '/main/noticeList',
				name: 'noticeList',
				component: NoticeListPage
			}, {//公告编辑
				path: '/main/noticeEdit',
				name: 'noticeEdit',
				component: NoticeEditPage
			}, {//广告列表
				path: '/main/adList',
				name: 'adList',
				component: AdListPage
			}, {//广告编辑
				path: '/main/adEdit',
				name: 'adEdit',
				component: AdEditPage
			}, {
				path: '/main/atags',
				name: 'atags',
				component: AttributeTagPage
			}, {
				path: '/main/atagGroup',
				name: 'atagGroup',
				component: AttributeTagGroupPage
			}, {
				path: '/main/worksList',
				name: 'worksList',
				component: WorksListPage
			}, {
				path: '/main/worksAttr',// 作品属性
				name: 'worksAttr',
				component: WorksAttrPage
			}, {
				path: '/main/worksType',// 作品类型
				name: 'worksType',
				component: WorksTypePage
			}, {
				path: '/main/worksArea',// 发行地区
				name: 'worksArea',
				component: WorksAreaPage
			}, {
				path: '/main/worksLabel',// 上映时间、集数、片长、票房
				name: 'worksLabel',
				component: WorksLabelPage
			}, {
				path: '/main/works2Status',
				name: 'works2Status',
				component: Works2StatusPage
			}, {
				path: '/main/works2Wait',
				name: 'works2Wait',
				component: Works2WaitPage
			}, {
				path: '/main/worksEdit',
				name: 'worksEdit',
				component: WorksEditPage
			}, {
				path: '/main/worksDetail',
				name: 'worksDetail',
				component: WorksDetailPage
			}, {//account list
				path: '/main/accountList',
				name: 'accountList',
				component: AccountListPage
			}]
		}
	]
})